<php>
$month_ = $_REQUEST['month'];
if(empty($month_))$month_='enable_Y';
$_REQUEST['month'] = "2011-12-01";
$pageData = model("Agent")->searchRebate($_SESSION['mid'],$_REQUEST['month'],'Y');
if(empty($pageData)||empty($pageData['data'])){
</php>
	<div style="width:100%;text-align:center;margin-top:15px;">
		<php>$alert_message="暂无符合条件的数据！";
		</php>
		<include file="../Public/alert_box.html" />
	</div>
<php>
}else{
	/**
	foreach($pageData['data'] as $vo1){
		if(!in_array($vo1['shelf_id'],$ary_shelfid))$ary_shelfid[]=$vo1['shelf_id'];
	}
	if(!empty($ary_shelfid))$goods_title = service('Product')->select4UserPRelInfoByIds($ary_shelfid);
	$pageData['goods_title']=$goods_title;
	**/
</php>
			<script>
			    //鼠标移动表格效果
			    inittable();
			    $('#total_no').html("{$pageData['count']}");
			</script>

  			<div class="list" style="margin-top:5px">
			  	<table cellspacing="0" cellpadding="0" border="0" width="100%" id="order_list">
					<tbody>
					  <tr rel="order_title">
					    <th style="text-align: center;">订单编号</th>
					    <th style="text-align: center;" class="line_l">订单状态</th>
					    <th style="text-align: center;" class="line_l">总金额</th>
					    <th style="text-align: center;" class="line_l">现金支付</th>
					    <!--  
					    <th style="text-align: center;" class="line_l">获得积分</th>
					    -->
					    <th style="text-align: center;" class="line_l">返利模式</th>
					    <th style="text-align: center;" class="line_l">返利金额</th>
					    <th style="text-align: center;" class="line_l">时间</th>
					    <th style="text-align: center;" class="line_l">操作</th>
					  </tr>
					  <volist id="vo" name="pageData['data']">
						  <tr rel="order_{$vo['order_id']}">
						 		<td style="text-align: center;border-left: 0px;">{$vo['order_id']}</td>
						 		<td style="text-align: center;">
						       	<php>if($vo['enable']=='Y'){</php>
						       		有效
						       	<php>}else{</php>
						       		无效，原因：{$vo['reason']}
						       	<php>}</php>
						       	</td>
						       	
						       	<td style="text-align: right;">{:formatMoney($vo['amount'])}</td>
						       	<td style="text-align: right;">{:formatMoney($vo['pay_money'])}</td>
						       	<!-- <td style="text-align: right;">{$vo['gain_credit']}</td> -->
						       	<td style="text-align: right;">
						       		<php>if($vo['rebate_model']=='rebate_money'){</php>
						       			{:formatMoney($vo['rebate_value'])}
						       		<php>}else{</php>
						       			{$vo['rebate_value']}%
						       		<php>}</php>
						       		&nbsp;{:getCategoryName($vo['rebate_model'])}
						       	</td>
						       	<td style="text-align: center;">{:formatMoney($vo['rebate_money'])}</td>
						       	<td style="text-align: center;">{:paramMillisecond2Date($vo['ctime'],'Y-m-d H:i','-- --')}</td>
						       	
						      	<td style="text-align: center;">
						      		<span style="cursor: pointer;"  onclick="showOrderDetail('{$vo['order_id']}')">详情</span>
						      	</td>
						  </tr>
					  </volist>
					</tbody>
				  	</table>
			  </div>
			  <div id="clear"></div>
			  <div id="show_order_page">
				  <div class="page_box">{$pageData['html']}</div>
			  </div>

<php>}</php>
<input type="hidden" id="stype" value="{$stype}"><!-- 用于记录查看的积分类型 -->